(function() {
    angular.module('app').factory('wordsControllerWordService', wordsControllerWordService);

    wordsControllerWordService.$inject = ['util', '$q','atomicNotifyService'];

    function wordsControllerWordService(util, $q,atomicNotifyService) {

        return {
            getWord: _getWord
        }

        function _getWord(json) {


            var defer = $q.defer();

            util.$get({
                url: '/marketconditions/word/getLeafWord.htm',
                data: json
            }).then(function(resp) {

                defer.resolve(resp.value);


            }, function(err) {

                atomicNotifyService.info('该类目下宝贝数据过少，暂无数据......');
                defer.reject(err);

            });

            return defer.promise;
        }

    }
})();
